Tegra: memctrl_v2: pack TZDRAM base to RSVD55_SCRATCH
authorHarvey Hsieh <[email protected]>
Mon, 18 Sep 2017 11:22:01 +0000 (19:22 +0800)
committerVarun Wadekar <[email protected]>
Wed, 23 Jan 2019 18:31:19 +0000 (10:31 -0800)
This patch saves the TZDRAM_BASE value to secure RSVD55
scratch register. The warmboot code uses this register to
restore the settings on exiting System Suspend.

Change-Id: Id76175c2a7d931227589468511365599e2908411
Signed-off-by: Harvey Hsieh <[email protected]>
plat/nvidia/tegra/common/drivers/memctrl/memctrl_v2.c
plat/nvidia/tegra/include/t186/tegra_def.h

index b1ccf5073d90d66c3471234a653f82d59ed4fa5d..bd601e4b39be2c258f0f38f07c13dc9c5b305382 100644 (file)
@@ -167,8 +167,6 @@ void tegra_memctrl_tzdram_setup(uint64_t phys_base, uint32_t size_in_bytes)
         */
 
        val = tegra_mc_read_32(MC_SECURITY_CFG1_0) & MC_SECURITY_SIZE_MB_MASK;
-       mmio_write_32(TEGRA_SCRATCH_BASE + SECURE_SCRATCH_RSV54_HI, val);
-
        val |= tegra_mc_read_32(MC_SECURITY_CFG0_0) & MC_SECURITY_BOM_MASK;
        mmio_write_32(TEGRA_SCRATCH_BASE + SECURE_SCRATCH_RSV55_LO, val);
 
index 20a799475fd874b8478b31f6baacdf5b2ea74647..6a0912e54648a78d22e9acb233ae000e1d4393cf 100644 (file)
 #define  SECURE_SCRATCH_RSV11_HI       U(0x6AC)
 #define  SECURE_SCRATCH_RSV53_LO       U(0x7F8)
 #define  SECURE_SCRATCH_RSV53_HI       U(0x7FC)
-#define  SECURE_SCRATCH_RSV54_HI       U(0x804)
 #define  SECURE_SCRATCH_RSV55_LO       U(0x808)
 #define  SECURE_SCRATCH_RSV55_HI       U(0x80C)